<?php
/**
 * @file			authImage.mod.php
 * @CopyRight		(C)1996-2099 SINA Inc.
 * @Project			Waitan
 * @Author			pengyong <pengyong@staff.sina.com.cn>
 * @Create Date:	2011-09-07
 * @Modified By:	pengyong/2011-09-08
 * @Brief			随机验证码
 */
class authImage_ctrl extends controls_base{
	function default_action(){
		$this->paint();
	}
	
	function paint(){
		header("Cache-Control: no-cache, must-revalidate");
		header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
		@session_start();
		$autoCode = APP :: N('authCode');
		$autoCode->setImage(array('type'=>'png','width'=>78,'height'=>25));
		$autoCode->paint();
	}
	
	// 注册页验证码
	function regpaint(){
		header("Cache-Control: no-cache, must-revalidate");
		header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
		@session_start();
		$autoCode = APP :: N('authCode');
		$autoCode->setSessionNamePre('reg');
		$autoCode->setImage(array('type'=>'png','width'=>78,'height'=>25));
		$autoCode->paint();
	}
}